From: Pino Toscano Date: Sat, 6 Jun 2026 20:25:09 +0000 (+0200) Subject: asn1: Include before using/checking bits from it X-Git-Tag: archive/raspbian/2%4.24.4+dfsg-1+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=4d116df9c0af4e0581aeb3a2eb378525fafb5234;p=samba.git asn1: Include before using/checking bits from it Origin: upstream, https://github.com/heimdal/heimdal/commit/2194be6c9259f79b97131cec8ae44e1180b4f309 Forwarded: not-needed Commit 232c936ea3eabfd702aaaa106ddf9474f231d776 added a fallback ENOTSUP definition. The check itself and the fallback definition rely on to be included already, so in case it was not (depending on the platform) then there will be a wrong definition of ENOTSUP. Instead of rely on to be included before including a generated header from this tool, include it manually. This way both the ENOTSUP check and its fallback definition (if ever) will always work. Gbp-Pq: Name heimdal-errno-include.patch --- diff --git a/third_party/heimdal/lib/asn1/gen.c b/third_party/heimdal/lib/asn1/gen.c index 55ec5f64..bdacaa7a 100644 --- a/third_party/heimdal/lib/asn1/gen.c +++ b/third_party/heimdal/lib/asn1/gen.c @@ -191,6 +191,7 @@ init_generate (const char *filename, const char *base) fprintf (headerfile, "#include \n" "#include \n" + "#include \n" "#include \n\n"); fprintf (headerfile, "#ifndef __asn1_common_definitions__\n" diff --git a/third_party/heimdal/lib/asn1/template.c b/third_party/heimdal/lib/asn1/template.c index ed215d88..96438876 100644 --- a/third_party/heimdal/lib/asn1/template.c +++ b/third_party/heimdal/lib/asn1/template.c @@ -38,6 +38,7 @@ #include #include #include +#include #ifndef ENOTSUP /* Very old MSVC CRTs don't have ENOTSUP */